<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Article extends Model
{

    protected $fillable = ['title','content'];
    protected $appends = ['short_content'];

    public function getShortContentAttribute()
    {
        return mb_substr($this->content,0,50)."...";
    }
}
